home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1998 July
/
EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso
/
recent
/
iib122.lha
/
IIB
/
ARexx
/
SiteSearch.rx
< prev
next >
Wrap
Text File
|
1998-05-03
|
2KB
|
127 lines
/* SiteSearch.rx, V1.1, ©1998 Salvatore Cagliari */
/* Set Start-Parameters */
Parse Arg Line
scriptname = "Site Search"
Options Results
/*
* If not called from Fiasco, try to address the active
* Fiasco project
*/
if ~abbrev(address(), "FIASCO.") then
do
ports = show("Ports")
do i = 1 to words(ports)
if abbrev(word(ports, i), "FIASCO.") then
do
Address Value word(ports, i)
GetAttr Project Name Active ARexx
Address Value Result
break
end
end
end
Thread_Port = address()
Signal on Syntax
Signal on Halt
Signal on Break_C
Signal on Failure
/* Get the FieldID of the requested Line */
Field = 'eMail.'|| Line
GetField Field
if rc~=0 then call script_out
eMail = result
/* Open the WebSites database in a new window */
open 'IIB:WebSites.fdb' New
if rc~=0 then call script_out
Address Value Result
WebSites_Port = Result
/* Set the Searchinformations and search for the requested Record */
NewSearchInfo Name "eMail_Adr"
if result ~= "eMail_Adr" then
do
signal Failure
end
SetSearchField SearchInfo "eMail_Adr" FieldID "eMail" Pattern eMail
if rc ~= 0 then signal Failure
Find SearchInfo "eMail_Adr" Record 0
if rc~=0 then signal Failure
record = result
/* Activate the requested Record */
ActiveRecord "Record" record
if result ~= record then signal Failure
script_out:
Address Thread_Port
exit
syntax:
failure:
if show("Ports", Thread_Port) then
do
Interpret Address Thread_Port
RequestChoice '"Error ' || rc || ' in line ' || sigl || ':*n' || errortext(rc) || '" "Cancel" Title "' || scriptname || '"'
end
else
do
say "Error" rc "in line" sigl ":" errortext(rc)
say "Enter to continue"
pull dummy
end
call script_out
halt:
break_c:
if show("Ports", Thread_Port) then
do
Interpret Address Thread_Port
RequestChoice '"Script Abort Requested" "Abort Script" Title "' || scriptname || '"'
if result = 0 then return
end
else
do
say "*** Break"
say "Enter to continue"
pull dummy
end
call script_out